﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using com.dz.common;
using com.dz.httpmoudle;
namespace com.dz.web.admin
{
    public partial class Global : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Token != null)
            {
                string userName = Token.UserName;
                lblUserName.Text = userName;
            }
            
        }

        /// <summary>
        /// 用户登录Token
        /// </summary>
        protected UserToken Token
        {
            get
            {
                UserToken token = HttpContext.Current.Items[AuthenticateModule.CONTEXT_ROLE_KEY] as UserToken;
                return token;
            }

        }

        protected void btnLogout_Click(object sender, EventArgs e)
        {
           // UserLoginHelper.DeleteUserTicket();
            Response.Redirect("/admin/login.aspx", true);
        }
    }
}
